package com.feib.stms.action;



import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

import com.feib.stms.model.UploadFile;
import com.feib.stms.model.UploadFileActionLog;

/**
 * 申購款資料放行
 * @author Jeff Gu
 *
 */
public class Stms3003ActionBean  extends BaseDoUploadFileActionbean{
	
	
	
	private static final long serialVersionUID = -6042400424532125885L;
	
	/**
	 * 預設頁面,放行頁面直接顯示待放行資料
	 */
	private static final String DEFAULT_JSP = "/WEB-INF/views/stms3003/stms3003.jsp";
	

	public Stms3003ActionBean() {
		super();
		super.fileFormats = new ArrayList<String>();
		super.fileFormats.add(getUploadFileFormat());
		super.fileStatus=getFileStatus();
		super.todoListMenuItemPk=getTodoListMenuItemPk();
		super.deleteFileStatus=getDeleteStatus();
	}	

	@Override
	protected String getDefaultPage() {
		return DEFAULT_JSP;
	}
	
	@Override
	public String getUploadFileFormat() {
		return UploadFile.UPLOAD_FILE_PURCHASE_PAYMENT;
	}



	@Override
	public String getDownloadFileName() {
		return "申購明細表_"+yyyyMMddHHmmSS.format(Calendar.getInstance().getTime())+".xls";
	}

	@Override
	public List<Integer> getFileStatus() {
		List<Integer> fileStatus=new ArrayList<Integer>();
		fileStatus.add(40);//40: 放行中(已有人員放行，但未達到放行人數門檻)
		fileStatus.add(30);//30: 已審查/待放行(檔案審查通過，所有審查人員皆對檔案審查通過)
	
		return fileStatus;
	}

	@Override
	public List<String> getActions() {
		List<String> actions=new ArrayList<String>();		
		actions.add(UploadFileActionLog.UPLOAD_FILE_ACTION_LOG_CONFIRM);		
		return null;
	}

	@Override
	public Long getTodoListMenuItemPk() {
		/* 交割款資料放行 沒有下一階段  */
		return new Long(0);
	}

	@Override
	public Integer getDeleteStatus() {
		/* 50: 已刪除/不放行(只要有一人不放行，即為放行不通過；明細應註記為刪除) */
		return 50;
	}



}
